"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const taro_1 = require("@tarojs/taro");
const react_1 = require("react");
const components_1 = require("@tarojs/components");
const taro_ui_1 = require("taro-ui");
const copyright_type_1 = require("../../util/copyright-type");
require("./copyright.scss");
const Copyright = () => {
    const [isOpened, setOpen] = react_1.useState(false);
    const goSubmit = () => {
        setOpen(!isOpened);
    };
    const submit = (value) => {
        // 1.著作权人  2.代理人
        if (value === 1) {
            taro_1.default.navigateTo({
                url: "/pages/copyright/copyright-submit/copyright-submit?userType=" + value
            });
        }
    };
    return (<components_1.View className="index">
      <components_1.View className="at-article">可登记作品类型</components_1.View>
      <components_1.View className="top">
        {copyright_type_1.copyrightType.map(item => {
        return (<components_1.View className="top-item">
              <components_1.Image style={{ marginBottom: '10px' }} className="img-style" src={item.img}/>
              <components_1.View>{item.name}</components_1.View>
            </components_1.View>);
    })}
      </components_1.View>
      <components_1.View className="center">
        <components_1.View className="btn" onClick={goSubmit}>
          在线登记
        </components_1.View>
      </components_1.View>
      <taro_ui_1.AtActionSheet isOpened={isOpened}>
        <taro_ui_1.AtActionSheetItem onClick={() => submit(1)}>
          我是著作权人
        </taro_ui_1.AtActionSheetItem>
        <taro_ui_1.AtActionSheetItem onClick={() => submit(2)}>
          我是代理人
        </taro_ui_1.AtActionSheetItem>
      </taro_ui_1.AtActionSheet>
    </components_1.View>);
};
exports.default = Copyright;
//# sourceMappingURL=copyright.jsx.map